<template>
   <div class="container">
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="page"
      :page-sizes="pageSizes"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
export default {
props:{
   pageSizes:{
      default(){return [20, 40, 60, 80, 100]},
      type:Array()
    },
    page:{
      default(){return 1},
      type:Number
    },
    total:{
       default(){return 0},
      type:Number
    },
    pageSize:{
      default(){return 20},
      type:Number
    }
},
methods:{
  handleSizeChange(val){
    this.$emit('changepageSize',val)
  },
  handleCurrentChange(val){
    this.$emit('pagechange',val)
  }
}
}
</script>

<style lang='less' scoped> 
.container{
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: right;
}
</style>